
module.exports = app => {
    class PBM3ApiController extends app.Controller {

        async getAdpositionsAds(ctx) {
            const query = ctx.query;
            const data = await ctx.api.portal.getAdpositionsAds(query);
            ctx.body = {
                code: 0,
                data
            }
        }
        async getArticles(ctx){
            const query = ctx.query;
            const data = await ctx.api.portal.getArticles(query);
            ctx.body = {
                code: 0,
                data
            }
        }
        async getTodayOptimization(ctx){
            const query = ctx.query;
            const data = await ctx.api.portal.getTodayOptimization(query);
            ctx.body = {
                code: 0,
                data
            }
        }

        async getArticleCategorise(ctx){
            const query = ctx.query;
            const data = await ctx.api.portal.getArticleCategorise(query);
            ctx.body = {
                code: 0,
                data
            }
        }
    }

    return PBM3ApiController;
}
